<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html>
<html>
<head>
<title>쇼핑몰 홈페이지</title>
<meta http-equiv="content-type" content="text/html; charset=euc-kr">
<link rel="stylesheet" href="include/font.css">

<script>
	function go_new() {
		location.href = "faq_new.html";
	}
</script>
</head>
<body bgcolor="white" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<center>
	<jsp:include page="../main_header.jsp" flush="true" />
	<h1>♥QnA 게시판♥</h1>
		<table width="600" border="0" cellspacing="0" cellpadding="0">
			<tr>
				<td align="right" height="50" valign="bottom">
					<form action="search" method="post">
						<select name="search">
							<option value="0">제목</option>
							<option value="1">글쓴이</option>
						</select> 
						<input type="text" name="searchtxt" >
						<input type="submit" value="검색">
					</form>
				</td>
			</tr>
			<tr>
				<td height="5" colspan="2"></td>
			</tr>
		</table>

		<table width="600" border="1" cellspacing="0" cellpadding="4" bordercolordark="white" bordercolorlight="black">
			<tr bgcolor="#CCCCCC" height="20">
				<td width="50" align="center"><font color="#142712">번호</font></td>
				<td width="450" align="center"><font color="#142712">제목</font></td>
				<td width="100" align="center"><font color="#142712">글쓴이</font></td>
				<td width="100" align="center"><font color="#142712">수정/삭제</font></td>
			</tr>
			<c:forEach items="${qnaList }" var="QnA">
				<tr>
					<td align="center">${QnA.board_no}</td>
					<td><a href="FAQ_detail?board_no=${QnA.board_no}">${QnA.board_title }</a></td>
					<td align="center">${QnA.board_writer}</td>
					<td align="center"><a href="Delete?board_no=${QnA.board_no}">삭제</a></td>
				</tr>
			</c:forEach>
		</table>
</center>
</body>
</html>